#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<algorithm>
#include<string>
#include<cstring>
#include<vector>
using namespace std;
const int N = 15;
int a[N];
bool st[N];
int t, n;
bool flag = false;
void dfs(int last, int y)
{
	if (flag == true) return;
	if (last >= n)
	{
		int x = 0;
		int cnt = 0;
		for (int j = 0; j < n; j++) if (st[j] == false) cnt++;
		if (cnt == n || cnt == 0)
		{
			return;
		}
		for (int i = 0; i < n; i++) if (!st[i]) x ^= a[i];
		if (x == y)
		{
			cout << "Yes" << endl;
			for (int i = 0; i < n; i++)
			{
				if (st[i]) cout << 0;
				else cout << 1;
			}
			cout << endl;
			flag = true;
			return;
		}
		return;
	}
	dfs(last + 1, y);
	st[last] = true;
	dfs(last + 1, y ^ a[last]);
	st[last] = false;
	return;
}
int main()
{
	cin >> t;
	while (t--)
	{
		memset(st, false, sizeof st);
		flag = false;
		cin >> n;
		for (int i = 0; i < n; i++) cin >> a[i];
		dfs(0, 0);
		if (flag == false) cout << "No" << endl;
	}
	return 0;
}

